package java05;

public class UserService{
    public void register(String username,String password) throws  Exception{
        int u = username.length();
        if(u < 6){
            throw new MyException("用户名长度太短！");
        }else  if(u > 14){
            throw new MyException("用户名太长！");
        }else {
            System.out.println("用户注册成功！");
            System.out.println("用户名：" + username + "  密码：" + password);
        }
    }
}
